const cloud = require('wx-server-sdk')

cloud.init()
const db = cloud.database();
const _= db.command;
// 云函数入口函数
 exports.main = async (event, context) => {
  var table = event.table;
  var docid = event.docid;
  console.log("table",table,"docid",docid)
    return await db.collection(table).doc(docid).remove()
}